﻿@model Stardust.Models.OrdenCompras
        
<h2>Listado de Orden de Compra</h2>
<p></p><p></p><p></p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

 @using (Html.BeginForm("ListarOC", "Proveedor", FormMethod.Post, new { @class = "form" }))
 {

   <fieldset>
        <div class = "widget" >
            <div class = "title"><h6>Buscar Proveedor</h6></div>

            <div class="formRow">
                <label>Proveedor</label>
                <div class = "formRight" >@Html.DisplayFor(model => model.nombre) @Html.HiddenFor(model => model.nombre)</div>
                <div class = "clear" ></div>
            </div>

        </div>
    </fieldset>
     
     
    <div class="wrapper">
    <div class="widget">
      <div class="title">
      <h6>Lista de Orden de compra</h6>
      </div>
      <div class="dataTables_wrapper">
            
            <table cellpadding = "0" cellspacing = "0" width = "100%" class = "display dTable">
    <thead>
        <tr>
            <th class="ui-state-default" rowspan="1" colspan="1" style="width:180px;" >
                <div class="DataTables_sort_wrapper">
                Fecha Emitida
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
            <th class="ui-state-default" rowspan="1" colspan="1" style="width:100px;" >
                <div class="DataTables_sort_wrapper">
               Estado Actual
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
             <th class="ui-state-default" rowspan="1" colspan="1" style="width:150px;" >
                <div class="DataTables_sort_wrapper">
                Precio Total
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
            <th class="ui-state-default" rowspan="1" colspan="1" style="width:210px;" >

            </th>
        </tr>
    </thead>

    <tbody>
        @for (int i = 0; (i < Model.listaOC.Count); i++)
        {
          <tr class="gradeA odd">       
               
                    <td> @Html.DisplayFor(model => model.listaOC[i].fecha) @Html.HiddenFor(model => model.listaOC[i].fecha)</td>
                    <td> @Html.DisplayFor(model => model.listaOC[i].estado) @Html.HiddenFor(model => model.listaOC[i].estado) </td>
                    <td> @Html.DisplayFor(model => model.listaOC[i].precio)  @Html.HiddenFor(model => model.listaOC[i].precio)  </td>
                    <td>
                        <a href="@Url.Action("PagoContado", new { id = Model.listaOC[i].id })"><img src="../../Content/images/icons/color/cash.png", alt="Cash" />Contado </a> |                    
                        <a href="@Url.Action("PagarCredito", new { id = Model.listaOC[i].id })"><img src="../../Content/images/icons/color/credit.png", alt="Credit" />Credito </a>
                    </td>
         </tr>

        }
    </tbody>
    </table>
    </div>
        
    </div>
</div> 
       
     <p></p><p></p><p></p>
    <p>
        @Html.ActionLink("Regresar", "PagoProveedor", "Proveedor")
    </p>
 }
